package com.ti.demo.autoconfigure.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.zalando.logbook.Correlation;
import org.zalando.logbook.HttpLogWriter;
import org.zalando.logbook.Precorrelation;

/**
 * @description: HttpLogWriter接口实现类，用于打印biz日志
 * @Author Triagen
 * @Date 2025/4/14 16:46
 */
public class AccLogWriter implements HttpLogWriter {

    private final Logger log = LoggerFactory.getLogger("acc");

    @Override
    public boolean isActive() {
        return log.isInfoEnabled();
    }

    @Override
    public void write(final Precorrelation precorrelation, final String request) {
    }

    @Override
    public void write(final Correlation correlation, final String response) {
        log.info(response);
    }
}
